package cn.edu.zafu.bigdata.lyq.work6;

public class TestInvalidAgeException {
    public static void main(String[] args) {
        int age =17;
        try{
            AgeCheck.CheckAge(age);
        }catch(InvalidAgeException e){
            System.out.println("错误：" + e.getMessage());
        }
        age = 27;
        try{
            AgeCheck.CheckAge(age);
        }catch(InvalidAgeException e){
            System.out.println("错误：" + e.getMessage());
        }
    }
}
